<template>
	<view class="rf-house-list" style="background-color: white;">
	<view class="v-housingResource-list" v-if="list.length > 0">
		<navigator :url="'/pages/company/detail?id=' + item.userid" class="item" v-for="(item, index) in list" :key="index" hover-class="none">
			
			
					
<view  class="list-item-view"><view  class="list-item">
<view  class="item-img">
<view   class="image-wrap cms-image" ><!---->
 <image :src="item.avatar" class="default-image" mode="aspectFill"></image>
</view>
<view  class="img-name"><view  class="name-top"><view  class="name">{{item.truename}}</view></view></view>

<view  class="item-icon">

</view></view><view  class="item-text"><text  class="text-1"><span>所属公司</span></text><text  class="text-2">{{item.company}}</text></view>
<view  class="item-text"><text  class="text-1">在售房源</text><text  class="text-2">二手房<text  class="primary-color">{{item.sale}}</text>套 | 租房<text  class="primary-color">{{item.rent}}</text>套</text></view>

</view></view>
			
			
		</navigator>
	</view>
	</view>
</template>

<script>
export default {
	name: 'companyList',
	props: {
		list: {
			type: Array,
			default: function(e) {
				return [];
			}
		}
	},
	filters: {
		timeFormat(val){
			if(val && val.length > 10){
				val = val.substr(0,10)
			}
			return val;
		}
	},
	methods: {
	makePhoneCall(phone) {
		uni.showModal({
			title: '提示',
			content: '点击拨打，立即联系：' + phone,
			confirmText: '拨打',
			success: async function (res) {
				if (res.confirm) {
					uni.makePhoneCall({
						phoneNumber: phone,
						success: () => {
							console.log("成功拨打电话")
						}
					})
				}
			}
		});
	}
	}
};

</script>

<style lang="scss">

.v-housingResource-list {
	background: #fff;
	margin-top: 2rpx;
	//推荐房源列表
	.first-padding .item:first-child {
	 padding-top:0
	}
	 .list-item-view{
	  position:relative;
	  padding:15px 15px 0 15px
	 }
	 .list-item-view::after {
	  position:absolute;
	  content:"";
	  box-sizing:border-box;
	  pointer-events:none;
	  right:0;
	  left:0;
	  -webkit-transform:scaleY(.5);
	  transform:scaleY(.5);
	  border-bottom:1px solid #f5f5f5;
	  bottom:0
	 }
	 @media (-webkit-min-device-pixel-radio:3),(min-device-pixel-radio:3) {
	  .list-item-view::after {
	   -webkit-transform:scaleY(.33333);
	   transform:scaleY(.33333)
	  }
	 }
	 @media (-webkit-min-device-pixel-radio:2),(min-device-pixel-radio:2) {
	  .list-item-view::after {
	   -webkit-transform:scaleY(.5);
	   transform:scaleY(.5)
	  }
	 }
	 .list-item-view .list-item{
	  box-sizing:border-box;
	  padding-bottom:10px
	 }
	 .list-item-view .list-item .ranking-sort{
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex;
	  -webkit-box-align:center;
	  -webkit-align-items:center;
	  align-items:center;
	  margin-right:10px
	 }
	 .list-item-view .list-item .ranking-sort .ranking-sort-item{
	  width:28px;
	  height:32px;
	  background:-webkit-linear-gradient(left,#ffd88d,#ffbe41);
	  background:linear-gradient(90deg,#ffd88d,#ffbe41);
	  color:#a87400;
	  font-size:16px;
	  font-family:DINOT;
	  font-weight:500;
	  text-align:center;
	  line-height:27px;
	  -webkit-clip-path:polygon(0 0,100% 0,100% 75%,50% 100%,0 75%,0 25%);
	  clip-path:polygon(0 0,100% 0,100% 75%,50% 100%,0 75%,0 25%)
	 }
	 .list-item-view .list-item .item-img{
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex;
	  -webkit-box-pack:justify;
	  -webkit-justify-content:space-between;
	  justify-content:space-between
	 }
	 .list-item-view .list-item .item-img .img-name{
	  padding-left:15px;
	  -webkit-box-flex:1;
	  -webkit-flex:1;
	  flex:1;
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex;
	  -webkit-box-align:center;
	  -webkit-align-items:center;
	  align-items:center
	 }
	 .list-item-view .list-item .item-img .img-name .name-top{
	  height:22px;
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex
	 }
	 .list-item-view .list-item .item-img .img-name .name-top .name{
	  height:22px;
	  font-size:16px;
	  font-weight:600;
	  color:#101d37;
	  margin-right:4px;
	  line-height:22px;
	  max-height:22px;
	  display:-webkit-box;
	  overflow:hidden;
	  word-break:break-all;
	  text-overflow:ellipsis;
	  -webkit-line-clamp:1;
	  -webkit-box-orient:vertical
	 }
	 .list-item-view .list-item .item-img .img-name .name-bottom{
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex;
	  height:17px;
	  -webkit-box-align:center;
	  -webkit-align-items:center;
	  align-items:center
	 }
	 .list-item-view .list-item .item-img .img-name .name-bottom .bottom-name{
	  height:17px;
	  font-size:10px;
	  font-weight:400;
	  line-height:17px;
	  color:#333
	 }
	 .list-item-view .list-item .item-img .img-name .name-bottom .bottom-icon{
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex
	 }
	 .list-item-view .list-item .item-img .img-name .name-bottom .bottom-icon .cms-svg-icon{
	  margin-left:10px
	 }
	 .list-item-view .list-item .item-img .item-icon{
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex;
	  margin-left: 160px;
	  width:82px;
	  -webkit-box-pack:justify;
	  -webkit-justify-content:space-between;
	  justify-content:space-between;
	  -webkit-box-align:center;
	  -webkit-align-items:center;
	  align-items:center;
	  padding-left:5px
	 }
	 .list-item-view .list-item .item-img .item-icon .icon-out{
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex;
	  width:32px;
	  height:32px;
	  background-color:#ffede9;
	  border-radius:50%;
	  -webkit-box-pack:center;
	  -webkit-justify-content:center;
	  justify-content:center;
	  -webkit-box-align:center;
	  -webkit-align-items:center;
	  align-items:center
	 }
	 .list-item-view .list-item .item-text{
	  display:-webkit-box;
	  display:-webkit-flex;
	  display:flex;
	  margin-top:8px
	 }
	 .list-item-view .list-item .item-text:first-child {
	  margin-top:10px
	 }
	 .list-item-view .list-item .item-text .text-1{
	  width:48px;
	  font-size:10px;
	  font-weight:400;
	  color:#999;
	  -webkit-flex-shrink:0;
	  flex-shrink:0
	 }
	 .list-item-view .list-item .item-text .text-2{
	  padding-left:15px;
	  width:100%;
	  font-size:10px;
	  font-weight:400;
	  color:#333;
	  opacity:1
	 }
	 .list-item-view .list-item .item-text .text-2 .primary-color{
	  color:#d22
	 }
	 .image-wrap .default-image {
	     will-change: transform;
	     height: 100%;
	     width: 100%;
	     pointer-events: none;
		 width: 49px;
		     height: 49px;
		     border-radius: 50%;
	 }
	 .cms-icon {
	     height: 16px;
	     width: 16px;
	     display: block;
	     background-size: cover;
	 }
	 
		.line {
			display: bock;
			width: 100%;
			height: 1rpx;
			margin-top: 22rpx;
			background: #e8e8e8;
		}
		&:last-child {
			.line {
				//display: none;
			}
			//padding-bottom: 30rpx;
		}
		
	
}
</style>
